Telegram Group & Telegram Channel
In:


int('୧৬𝟙༣')


Out:


1613


Цифры 0 1 2 3 4 5 6 7 8 9 — это не единственные символы, которые считаются цифрами. Python следует правилам Unicode и считает «цифрами» сотни различных символов. Вот полный список таких символов.

Это влияет на такие функции, как int, unicode.isdecimal и даже re.match:


# Пример 1
int('෯')
# Вывод:
9

# Пример 2
'٢'.isdecimal()
# Вывод:
True

# Пример 3
import re
bool(re.match(r'\d', '౫'))
# Вывод:
True


👉@BookPython



tg-me.com/BookPython/3702
Create:
Last Update:

In:


int('୧৬𝟙༣')


Out:


1613


Цифры 0 1 2 3 4 5 6 7 8 9 — это не единственные символы, которые считаются цифрами. Python следует правилам Unicode и считает «цифрами» сотни различных символов. Вот полный список таких символов.

Это влияет на такие функции, как int, unicode.isdecimal и даже re.match:


# Пример 1
int('෯')
# Вывод:
9

# Пример 2
'٢'.isdecimal()
# Вывод:
True

# Пример 3
import re
bool(re.match(r'\d', '౫'))
# Вывод:
True


👉@BookPython

BY Библиотека Python разработчика | Книги по питону


Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283

Share with your friend now:
tg-me.com/BookPython/3702

View MORE
Open in Telegram


Библиотека Python разработчика Telegram | DID YOU KNOW?

Date: |

For some time, Mr. Durov and a few dozen staffers had no fixed headquarters, but rather traveled the world, setting up shop in one city after another, he told the Journal in 2016. The company now has its operational base in Dubai, though it says it doesn’t keep servers there.Mr. Durov maintains a yearslong friendship from his VK days with actor and tech investor Jared Leto, with whom he shares an ascetic lifestyle that eschews meat and alcohol.

Newly uncovered hack campaign in Telegram

The campaign, which security firm Check Point has named Rampant Kitten, comprises two main components, one for Windows and the other for Android. Rampant Kitten’s objective is to steal Telegram messages, passwords, and two-factor authentication codes sent by SMS and then also take screenshots and record sounds within earshot of an infected phone, the researchers said in a post published on Friday.

Библиотека Python разработчика from vn


Telegram Библиотека Python разработчика | Книги по питону
FROM USA